class_name NpcUtil

#根据id获取npc
static func get_npc_for_ids(id: String) -> Array:
	var npc_array = StringUtil.read_file_to_Array("res://config/NpcInfo.json")
	var temp_array=[]
	for item in npc_array:
		if id.contains(str("|")+str(int(item["id"]))+str("|")):
			temp_array.append(item)
	return temp_array
#根据id获取npc
static func get_npc_for_id(id: float) -> Dictionary:
	var npc_array = StringUtil.read_file_to_Array("res://config/NpcInfo.json")
	var temp_data
	for item in npc_array:
		if id==item["id"]:
			temp_data= item
	return temp_data
